package com.ldn.basic.dispose.exception;

/**
 * @author 李大牛家的牛 (scafel@163.com) 
 * @createDate 2024/7/9 - 16:24
 * @description 自定义的异常类用于处理代码中异常问题手动抛出问题
 **/
public class AppException extends RuntimeException{

    private Integer code;

    public AppException(String message) {
        super(message);
        this.code = -1;
    }

    public AppException(String code, String message) {
        super(message);
        this.code = Integer.valueOf(code);
    }

    public AppException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}
